<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<!-- ko if: $col.isSingle($row()._rowIndex) -->
<a
    class="action-menu-item"
    data-bind="
        repeat: {
            foreach: $col.getVisibleActions($row()._rowIndex),
            item: '$action'
        }"
    data-repeat-bind="
        attr: {
            href: $action().href
        },
        click: $col.getActionHandler($action()),
        text: $action().label"
    ></a>
<!-- /ko -->

<!-- ko if: $col.isMultiple($row()._rowIndex) -->
<div
    class="action-select-wrap"
    data-bind="collapsible">
    <button class="action-select" data-bind="toggleCollapsible">
        <span data-bind="i18n: 'Select'"></span>
    </button>
    <ul
        class="action-menu"
        data-bind="
            css: {'_active': $collapsible.opened}">
        <li
            data-bind="
                repeat: {
                    foreach: $col.getVisibleActions($row()._rowIndex),
                    item: '$action'
                }">
            <a
                class="action-menu-item"
                data-bind="
                    attr: {
                        href: $action().href
                    },
                    click: $col.getActionHandler($action()),
                    text: $action().label"></a>
        </li>
    </ul>
</div>
<!-- /ko -->
